﻿<%@ Page Language="c#" CodeBehind="TManage.aspx.cs" MasterPageFile="~/App_MasterPages/layout.Master"
    AutoEventWireup="false" Inherits="ud_gSDMS.testing.Testing_Manage" EnableEventValidation="false" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">

<script type="text/javascript">
    function newAlert() {
        var str = document.getElementById('<%= hidAvailable.ClientID %>').value;
        if (str != "")
            alert(str);
    }


</script>
<portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
    <mp:CornerRounderTop id="ctop1" runat="server" />
    <asp:Panel ID="pnlStoreManager" runat="server" CssClass="art-Post-inner panelwrapper gSDMS">
            <portal:ModuleTitleControlCustom ID="moduleTitle" runat="server" RenderArtisteer="true" UseLowerCaseArtisteerClasses="true"/>
        <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
        <div class="modulecontent">
            <fieldset>
<%--            <asp:UpdatePanel ID='updatePanel' runat="server" >
                <ContentTemplate>--%>

                <%--<mp:SiteLabel ID="lblInfo" CssClass="title info" runat="server" ResourceFile="gSDMSResource" ConfigKey="gSDMSHostingPackage" />--%>
                <div class="div_title">
                    <a href="/gsdmsmodule/testing/TManage.aspx">Testing</a>
                    &nbsp;>&nbsp;
                    <a href="#">List</a>
                </div>
                <br />
                <div class="div_Edit div_search">
                    <table cellpadding='5' cellspacing='0' border='0' class="tb_search" >

                        <tr>
                            <td class="title">From Date :</td>
                            <td class="input"> 
                                <telerik:RadDatePicker ID="datFrom_Date" runat="server" 
                                        DateInput-DateFormat="dd/MM/yyyy" DateInput-CssClass="txtInput" DateInput-MaxLength="10"
                                        DatePopupButton-Width="23px" DatePopupButton-Height="23px" 
                                >
                                    <Calendar>
                                        <SpecialDays>
                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                        </SpecialDays>
                                    </Calendar>
                                </telerik:RadDatePicker>
                           
                            </td>
                            
                            <td class="title">To Date:</td>
                            <td class="input"> 
                                <telerik:RadDatePicker ID="datTo_Date" runat="server" 
                                        DateInput-DateFormat="dd/MM/yyyy" DateInput-CssClass="txtInput" DateInput-MaxLength="10" 
                                        DatePopupButton-Width="23px" DatePopupButton-Height="23px" 
                                >
                                    <Calendar>
                                        <SpecialDays>
                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                        </SpecialDays>
                                    </Calendar>
                                </telerik:RadDatePicker>
         
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Project Code :</td>
                            <td class="input" >
                                <telerik:RadComboBox ID="cboProject_Code" runat="server" AllowCustomText="true" EmptyMessage="" Filter="Contains"  Width="300"  ></telerik:RadComboBox>
                                
                            </td>
                            
                            <td class="title">Project Name :</td>
                            <td class="input" colspan="2">
                                <telerik:RadComboBox ID="cboProject_Name"  runat="server" AllowCustomText="true" EmptyMessage="" Filter="Contains" Width="300"></telerik:RadComboBox>
                            </td>
                        </tr>
                        
                        <tr>
                            <td class="title">Sender :</td>
                            <td class="input">
                                <telerik:RadComboBox ID="cboSender" runat="server" ></telerik:RadComboBox>
                            </td>
                            
                            <td class="title">Assinged To :</td>
                            <td class="input">
                                <telerik:RadComboBox ID="cboAssigned_To" runat="server" ></telerik:RadComboBox>

                            </td>
                        </tr>

                        <tr>
                            <td class="title">Status :</td>
                            <td class="input">
                                <telerik:RadComboBox ID="cboStatus" runat="server" >
                                </telerik:RadComboBox>
                            </td>
                            
                        </tr>
                        <tr>
                            <td></td>
                            <td class="input" colspan="3">
                                <asp:ImageButton ID='btnSearch' runat="server" ImageAlign="Left" ImageUrl="~/Data/Sites/1/skins/StandardSkin/images/search.png" Width="82px" Height="23px" />
                                <div class="div_AddNew div_Edit">
                                    <asp:Button ID="btnAdd_New" runat="server" CssClass="btn_01" Text="Add New" Visible="false" OnClientClick="newAlert()" />
                                    </div>
                            </td>
                            <asp:HiddenField ID="hidAvailable" runat="server" />
                        </tr>
                        
                    </table>
                </div>
                <br />
                <div class="gSDMS_Grid">
                    <asp:GridView ID="grdProject_Test_List" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" 
                        AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" PageSize="20" PagerSettings-Position="Bottom" PagerStyle-HorizontalAlign="Right"
                        CssClass="css_grid" DataKeyNames="Project_Test_ID"
                        >                        
                        <AlternatingRowStyle CssClass='AlternatingRowStyle' />
                        <EditRowStyle CssClass='EditRowStyle' />
                        <FooterStyle CssClass='FooterStyle' />
                        <HeaderStyle CssClass='HeaderStyle' />
                        <PagerStyle CssClass='PagerStyle' HorizontalAlign="Right" />
                        <RowStyle CssClass='RowStyle' />
                        <SelectedRowStyle CssClass='SelectedRowStyle' />
                   
                        <Columns >
                            <asp:TemplateField HeaderText="#" ItemStyle-CssClass="stt">
                                <ItemTemplate><%# grdProject_Test_List.PageIndex * grdProject_Test_List.PageSize + grdProject_Test_List.Rows.Count + 1%></ItemTemplate></asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Project Code" ItemStyle-CssClass="text" SortExpression='Project_Code'>
                                <ItemTemplate><%#Eval("Project_Code")%></ItemTemplate></asp:TemplateField>

                            <asp:TemplateField HeaderText="Start Date" ItemStyle-CssClass="date" SortExpression="Start_Date" ItemStyle-Width="80">
                                <ItemTemplate><%# Eval("Start_Date").ToString()=="" ? "" : Convert.ToDateTime(Eval("Start_Date")).ToString("dd/MM/yyyy")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>

                            <asp:TemplateField HeaderText="End Date" ItemStyle-CssClass="date"  SortExpression="End_Date" ItemStyle-Width="80">
                                <ItemTemplate><%# Eval("End_Date").ToString() == "" ? "" : Convert.ToDateTime(Eval("End_Date")).ToString("dd/MM/yyyy")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>

                            <asp:TemplateField HeaderText="Status" ItemStyle-CssClass="text" SortExpression="Status" ItemStyle-Width="40">
                                <ItemTemplate><%#Eval("Status")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Errors" ItemStyle-CssClass="text" SortExpression="Total_Errors" ItemStyle-Width="40">
                                <ItemTemplate><%#Eval("Total_Errors")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:TemplateField>

                            <%--------%>

                            <asp:TemplateField HeaderText="Fixed" ItemStyle-CssClass="text" SortExpression="Fixed" ItemStyle-Width="40" >
                                <ItemTemplate><%#Eval("Fixed")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:TemplateField>

                            <asp:TemplateField HeaderText="Open" ItemStyle-CssClass="text" SortExpression="Waiting_Approve" ItemStyle-Width="40">
                                <ItemTemplate><%#Eval("Waiting_Approve")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Pending" ItemStyle-CssClass="text" SortExpression="Pending" ItemStyle-Width="40">
                                <ItemTemplate><%#Eval("Pending")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Right" />
                                </asp:TemplateField>
                                                        
                            <asp:TemplateField HeaderText="Sender" ItemStyle-CssClass="text" SortExpression="Sender" ItemStyle-Width="40">
                                <ItemTemplate><%# Eval("Sender")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>

                            <asp:TemplateField HeaderText="Assigned To" ItemStyle-CssClass="text" SortExpression="Assigned_To" ItemStyle-Width="70">
                                <ItemTemplate><%# Eval("Assigned_To")%></ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>

                            <%--------%>
                                                                
                            <asp:TemplateField HeaderText="Edit" ItemStyle-CssClass="edit-del" ItemStyle-Width="40">
                                <ItemTemplate>
                                        <asp:ImageButton ID="btn_Edit" runat="server" CommandName="error" CommandArgument='<%# Eval("Project_Test_ID") %>' CssClass="delete"  ToolTip="Edit" ImageUrl="~/Data/Sites/1/skins/StandardSkin/images/edit.png"  ValidationGroup="1110000" Visible="false"/>
                                        <%--<a class="edit" href='<%# "/gsdmsmodule/testing/Error_Lists.aspx?pageid=29&id=" + Eval("Test_Error_ID") %>' title="Edit"></a>--%>
                                </ItemTemplate>
                                
                                </asp:TemplateField>

                           <asp:TemplateField HeaderText="Delete" ItemStyle-CssClass="edit-del" ItemStyle-Width="40">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btn_Delete" runat="server" CommandName="delete" CommandArgument='<%# Eval("Project_Test_ID") %>' CssClass="delete"  ToolTip="Delete" ImageUrl="~/Data/Sites/1/skins/StandardSkin/images/delete.png"  ValidationGroup="1110000" OnClientClick="return confirm('Do you want to delete?')" Visible="false"/>
                                    <%--<a class="edit" href='<%# "/gsdmsmodule/testing/BrwError.aspx?pageid=29&id=" + Eval("Test_Error_ID") %>' title="Edit">&nbsp;</a>  --%>                                  
                                </ItemTemplate></asp:TemplateField>

                        </Columns>

                        <EmptyDataTemplate>
                            <div class="div_dataEmpty">Data not found!</div>
                        </EmptyDataTemplate>
                    </asp:GridView>

                    <div style="display:none">
                    
                    <telerik:RadGrid ID="hiddenGrid" GridLines="Both" runat="server">
                            <ExportSettings>
                                <Excel Format="Html" />
                            </ExportSettings>
                        </telerik:RadGrid>
                </div>
                   
                  
                </div>
                <br />
                
<%--                </ContentTemplate>
            </asp:UpdatePanel>--%>
                
            </fieldset>
        </div>
        </portal:mojoPanel>
        <div class="cleared"></div>
    </asp:Panel>
    <mp:CornerRounderBottom id="cbottom1" runat="server" />
    </portal:mojoPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
